package com.micromap.dataprocessing.domain

import java.time.LocalDate
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

@Entity
@Table(name = "T_AAA_MENU_NODE")
class MenuNode {
    //"节点ID"
    @Id
    var nodeId: Long? = null
    //"菜单ID"
    var menuId: Long? = null
    //"场景ID"
    var scenarioId: Long? = null
    //"父级ID"
    var parentId: Long? = null
    var version: Long? = null
    var crtUserId: String? = null
    var crtUserName: String? = null
    var crtDate: LocalDate? = null
    var mntUserId: String? = null
    var mntUserName: String? = null
    var mntDate: LocalDate? = null

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as MenuNode

        if (nodeId != other.nodeId) return false

        return true
    }

    override fun hashCode(): Int = nodeId?.hashCode() ?: 0


}
